home *** CD-ROM | disk | FTP | other *** search
/ Ian & Stuart's Australian Mac 1 / Ian and Stuart's One (Australia).iso / Australasian Legends / Commercial / Rainbow Hill / MacDOS™ 2.0.0 / User's Guide / 13.4 REN - TOUPPER < prev    next >
Text File  |  1994-09-20  |  30KB  |  780 lines

  1. REN, RENAME
  2.        change  the  name, the creator, and the type of  a  file  or
  3.        group  of  files.  These commands also  assign  the  current
  4.        date/time and toggle the 'hidden' file attribute.
  5.  
  6.    Syntax
  7.        ren source [destination] [/!] [/C=src creator]
  8.        [/C!dst creator] [/D] [/H] [/L] [/T=src file type]
  9.        [/T!dst file type]
  10.  
  11.        The two commands REN and RENAME are functionally identical.
  12.  
  13.    Parameters
  14.        source
  15.        is  a  filename  preceded by an absolute  or  relative  path
  16.        which specifies the file or group of files to be renamed.  A
  17.        group of files is identified via a wildcarded filename or  a
  18.        directory  name.  To  rename  a  folder  rather   than   its
  19.        contents, refer to RENDIR.
  20.  
  21.        destination
  22.        is   a  filename   which  specifies  the  new   name[s].  If
  23.        omitted,  it  is  assumed  to be  identical  to  the  source
  24.        argument.
  25.  
  26.    Switches
  27.        /!
  28.        enables  automatic update of destination names  in  case  of
  29.        duplications.  When RENAME finds that a file with  the  same
  30.        name  already  exists, it extends the new filename  with  an
  31.        alphanumeric character (0..9, a..z).
  32.  
  33.        /C=src creator
  34.        /C!dst creator
  35.        with  the  equal  sign, /C specifies that only  files  of  a
  36.        particular  creator are to be renamed. With the  exclamation
  37.        mark, it specifies that the creator of the file[s] is to  be
  38.        changed  to  the specified value. Note that  no  spaces  are
  39.        allowed  on  either  side of the equal sign  or  exclamation
  40.        mark,  and  that  the creator must be four characters  long.
  41.        Therefore, if a creator includes space characters  you  must
  42.        double  quote  the switch (eg. ren /c=ABCD "/c=ABC  "  would
  43.        select  all  files  in  the  current  directory  created  by
  44.        'ABCD'and change their creator to 'ABC ').
  45.  
  46.        /D
  47.        changes  the  date and time of last update  to  the  current
  48.        date and time.
  49.  
  50.        /H
  51.        toggles  the  'hidden'  file  attribute.  A  hidden   source
  52.        becomes  visible, and a visible source becomes hidden.  This
  53.        switch  is  only legal when the source argument specifies  a
  54.        single file.
  55.  
  56.        /L
  57.        makes the selection of source files case sensitive.
  58.  
  59.        /T=src file type
  60.        /T!dst file type
  61.        with  an  equal  sign, /T specifies that  only  files  of  a
  62.        particular  type  (eg. 'TEXT') are to be renamed.  With  the
  63.        exclamation mark, it specifies that the type of the  file[s]
  64.        is  to  be  changed  to the specified value.  Note  that  no
  65.        spaces  are  allowed on either side of  the  equal  sign  or
  66.        exclamation  mark,  and  that the file  type  must  be  four
  67.        characters long. Therefore, if a file type includes  spaces,
  68.        you must double quote the switch (eg. ren /t=ABCD "/t=ABC  "
  69.        would   select  all  files  in  the  current  directory   of
  70.        type'ABCD'and change their type to 'ABC ').
  71.  
  72.    MacDOS vs DOS
  73.        destination
  74.        DOS  returns an error if the destination is identical to the
  75.        source.  MacDOS  accepts equal filenames, although  it  only
  76.        performs  the renaming when necessary. The main  reason  for
  77.        relaxing  the check is that MacDOS provides the  possibility
  78.        of  changing some file attributes without having  to  change
  79.        the filenames.
  80.  
  81.        Switches
  82.        MacDOS provides several switches while DOS provides none.
  83.  
  84.        Usage of wildcards
  85.        MacDOS  has  a  better wildcarding mechanism than  DOS  (see
  86.        below for details).
  87.  
  88.    Notes
  89.        Upper and lower case
  90.        Unless  you specify the option /L, characters in  upper  and
  91.        lower  case  are considered identical when filtering  source
  92.        files.  On  the  other  hand, with or  without  /L  the  new
  93.        destination  filename will be as typed  by  you.  Note  that
  94.        because  the Mac OS does not make distinction between  upper
  95.        and  lower case when identifying files, a command which just
  96.        changes  from  upper to lower case or vice  versa  a  single
  97.        filename  without actually changing characters  returns  the
  98.        error  "duplicate filename". You must perform such a  change
  99.        in two steps or use wildcards.
  100.  
  101.        Changing visibility
  102.        You  are  only allowed to change the visibility of one  file
  103.        at  a  time. That is, you cannot wildcard the filename  when
  104.        you use /H.
  105.  
  106.        Wildcarding strategies
  107.        MacDOS  memorises adjacent wildcard characters as  a  single
  108.        wildcard  sequence characterised by the minimum and  maximum
  109.        lengths of possible matching strings. The minimum length  of
  110.        a  matching  string  coincides with the number  of  question
  111.        marks  in  the  sequence. The maximum length of  a  matching
  112.        string also coincides with the number of question marks  but
  113.        only  if  there are no asterisks. If there are one  or  more
  114.        asterisks, the maximum length of a matching string  is  only
  115.        limited  by the maximum length of filenames (31 characters).
  116.        Note  that  because  of this strategy,  wildcarding  strings
  117.        containing at least one asterisk and having the same  number
  118.        of        question        marks        are        equivalent
  119.        (eg.  "*?*?",  "**??",  "?*?", "?****?**",  etc).  In  fact,
  120.        there  is  no  reason to use more than  one  asterisk  in  a
  121.        string of adjacent wildcard characters, and the ordering  of
  122.        the question marks and the single asterisk is irrelevant.
  123.  
  124.        When  you  specify  a  folder as  source  parameter,  MacDOS
  125.        renames all the files in that folder.
  126.  
  127.        Normally,   each  wildcarding  section  of  the  destination
  128.        consists  of  a  single asterisk, as the  main  function  of
  129.        RENAME  is  to replace fixed parts of source filenames  with
  130.        fixed  strings  which  appear in the destination.  That  is,
  131.        MacDOS  only uses the wildcards in the destination to  match
  132.        corresponding  wildcard sections in the  source.  Therefore,
  133.        wildcard  sequences  in  the  destination  usually  have   a
  134.        maximum  length  equal to or greater than the  corresponding
  135.        sequences in the source. Nevertheless, combinations  with  a
  136.        wildcard  sequence  in  the  destination  shorter  than  the
  137.        corresponding  one in the source are legal.  In  that  case,
  138.        the  source  string is truncated before being inserted  into
  139.        the  destination.  For example, "REN *.* ????????.???"  cuts
  140.        all  filenames  containing  a  period  to  eight  characters
  141.        before  and  three characters after the period.  Names  with
  142.        fewer  characters than the maximum length of the wildcarding
  143.        sequences in the destination are left unchanged. If, on  the
  144.        other hand, the minimum length of a wildcarding sequence  in
  145.        the  destination  is greater than the number  of  characters
  146.        matched  by  the corresponding sequence in the  source,  the
  147.        characters  are  copied to the destination filename  WITHOUT
  148.        padding  or repetitions. In conclusion, "REN *.txt  ???.doc"
  149.        renames  a.txt to a.doc, ab.txt to ab.doc, and  abcd.txt  to
  150.        abc.doc .
  151.  
  152.        The  renaming  with wildcarding sections in the  destination
  153.        shorter  than  the corresponding sections in the  source  is
  154.        somewhat  dangerous, because different filenames  might  end
  155.        up with the same name.
  156.  
  157.    Examples
  158.        When  the source contains AS MANY wildcard sections  as  the
  159.        destination,  they are matched in sequence.  The  characters
  160.        explicitly  given  in the source are then  replaced  by  the
  161.        corresponding characters of the destination:
  162.  
  163.        no wildcards:
  164.           REN b.ext blob  renames 'b.ext' to be 'blob'
  165.  
  166.        one wildcard section:
  167.           REN *TXT *DOC   replaces  all  terminating  "TXT"s   with
  168.                            "DOC"s
  169.  
  170.           REN ??? *.TXT   attaches  the  extension  ".TXT"  to  all
  171.                            filenames three letters long
  172.  
  173.           REN aFold bla_* "bla_"  is prepended to all filenames  in
  174.                            the folder 'aFold'
  175.  
  176.           REN abc* *      "abc"   is  removed  from  all  filenames
  177.                            which begin with it
  178.  
  179.        two wildcard sections:
  180.           REN *LOW* *low* replaces  with "low" all sequences  which
  181.                            match  "LOW" first encountered  in  each
  182.                            filename   (ie.  "Low",  "low",   "LoW",
  183.                            etc.)
  184.  
  185.           REN *LOW* *low*/L    replaces with "low" the "LOW"  first
  186.                            encountered in each filename
  187.  
  188.           REN "* ???" *.* replaces  a  space with a period  in  all
  189.                            filenames  where the space occurs  three
  190.                            characters before the end
  191.  
  192.           REN *.?* ????????.*
  193.                            truncates  to  eight  characters  before
  194.                            the  period all filenames which  contain
  195.                            a   period  followed  by  at  least  one
  196.                            character
  197.  
  198.           REN *AA* *A*    replaces  the  first pair of  'A's  found
  199.                            in  each  filename with  a  single  'A'.
  200.                            What  happens  if there  are  two  files
  201.                            named,  say,  XAAAB and  XAAB  ?  MacDOS
  202.                            aborts  the  operation when it  attempts
  203.                            to  rename  XAAAB, because XAAB  already
  204.                            exists.
  205.  
  206.           REN/! *AA* *A*  as   in   the  previous  example,  MacDOS
  207.                            replaces  the first pair of  'A's  found
  208.                            in  each filename with a single 'A'.  If
  209.                            there  are  two files named, say,  XAAAB
  210.                            and  XAAB, MacDOS renames XAAAB to XAAB0
  211.                            because  XAAB  already exists  (although
  212.                            later  XAAB is renamed to XAB). If XAAB0
  213.                            already exists, MacDOS renames XAAAB  to
  214.                            XAAB1  (although later XAAB0 is  renamed
  215.                            to   XAB0).   This   "forced"   renaming
  216.                            continues  by changing 1 to 2,  3,  ...,
  217.                            9, a, b, ..., and z.
  218.  
  219.        When  the  source contains MORE wildcard sections  than  the
  220.        destination,  the  parts  masked  in  the  source   by   the
  221.        additional wildcarding sections are left unchanged. This  is
  222.        a  way  of  selecting  filenames on  the  basis  of  several
  223.        specific  strings but then only replace the first  one.  For
  224.        example:
  225.  
  226.           REN SRC*.* DST* replaces  the  first three characters  of
  227.                            filenames   which   contain   a   period
  228.                            somewhere  after  the  initial  sequence
  229.                            (equivalent to: "REN SRC*.* DST*.*")
  230.  
  231.           REN *.?? *.X    inserts  an  'X'  after  the  period   of
  232.                            filenames   in  which  the   period   is
  233.                            followed   by  exactly  two   characters
  234.                            (equivalent to: "REN *.?? *.X*")
  235.  
  236.           REN * Z         prepends   a   'Z'   to   all   filenames
  237.                            (equivalent to: "REN * Z*")
  238.  
  239.        The  source  is  NOT  ALLOWED to contain  FEWER  wildcarding
  240.        sections than the destination.
  241.  
  242.        The  following  example illustrates the problems  which  can
  243.        occur when truncating filenames:
  244.           REN A*X A?X     cuts   down   to  three  characters   all
  245.                            filenames which begin with an 'A'.  What
  246.                            happens  if  two files are  named,  say,
  247.                            AB1X  and AB2X ? AB1X is renamed to ABX,
  248.                            but  then the renaming sequence must  be
  249.                            aborted,  because AB2X  should  also  be
  250.                            renamed  to ABX and that is not allowed.
  251.                            With  the  option  /!,  AB2X  would   be
  252.                            renamed to ABX0.
  253.  
  254.    Frequently occurring errors
  255.        E27: File or directory not found
  256.        The  source parameter did not identify any file  at  all  or
  257.        one  of  the  folders specified in the  path  could  not  be
  258.        found.  Note that creator and file type are case  sensitive.
  259.        Therefore, /T=text does not find any file of type 'TEXT'.
  260.  
  261.        E58: Duplicate filename(s)
  262.        A  file  with  the  destination  filename  (or  one  of  the
  263.        filenames, in case of wildcarded renaming) already  existed.
  264.        There are two cases in which this error message can also  be
  265.        displayed when the /! switch is ON:
  266.          1    The  new  name  is  already 31  characters  long  and
  267.           MacDOS  cannot append the character which would  make  it
  268.           unique.
  269.          2    MacDOS  has  already encountered 36  files  with  the
  270.           same  new  name.  In this case, MacDOS  has  run  out  of
  271.           possible extension (10 digits and 26 letters).
  272.  
  273.    See Also
  274.        RENDIR
  275.  
  276.  
  277. RENDIR
  278.        changes the name of a single directory.
  279.  
  280.    Syntax
  281.        rendir source destination
  282.  
  283.    Parameters
  284.        source
  285.        specifies  the directory to be renamed. It can  be  preceded
  286.        by a volume and path spec.
  287.  
  288.        destination
  289.        specifies  the  new  name  of the directory.  It  cannot  be
  290.        preceded by a volume and path spec.
  291.  
  292.    MacDOS vs DOS
  293.        DOS does not support RENDIR.
  294.  
  295.    Frequently occurring errors
  296.        E11: Not a directory
  297.        You tried to rename a file with RENDIR. Use RENDIR.
  298.  
  299.        E27: File or directory not found
  300.        MacDOS  did not find the folder to be renamed or one of  the
  301.        folders specified in its path.
  302.  
  303.    See Also
  304.        MKDIR, RMDIR, RENAME
  305.  
  306.  
  307. RESTART
  308.        restarts the Macintosh.
  309.  
  310.    Syntax
  311.        restart
  312.  
  313.    MacDOS vs DOS
  314.        DOS does not support RESTART.
  315.  
  316.    See Also
  317.        SHUTDOWN
  318.  
  319.  
  320. SERIAL
  321.        Directs MacDOS to use the serial port[s] for Input/Output.
  322.  
  323.    Syntax
  324.        serial [inout | OFF] [/M]
  325.  
  326.    Parameters
  327.        inout
  328.        identifies  the  ports to be used for serial  communication.
  329.        It  consists of a pair of letters (not case sensitive) which
  330.        specify   the  ports  to  be  used  for  input  and   output
  331.        respectively.  'A' indicates port A (the  modem  port),  'B'
  332.        indicates  port B (the printer port) and '@' indicates  that
  333.        no port should be used.
  334.  
  335.        OFF
  336.        disables I/O via the serial port[s].
  337.  
  338.        /M
  339.        specifies  that  MacDOS has just to Monitor  the  characters
  340.        read  from the serial port instead of interpreting  them  as
  341.        commands.  The  default is that MacDOS does accept  commands
  342.        from the serial port.
  343.  
  344.        Without parameters, SERIAL reports the current setting.
  345.  
  346.    MacDOS vs DOS
  347.        DOS does not support SERIAL.
  348.  
  349.    Notes
  350.        Port settings
  351.        The  ports  are set to 9600 bps, no parity, 8 data  bits,  1
  352.        stop bit, and hardware handshaking.
  353.  
  354.        Working in parallel to the standard I/O
  355.        The   console   window   and  the  keyboard   remain   fully
  356.        operational while I/O via the serial port[s] is enabled.
  357.  
  358.        Control characters
  359.        MacDOS  accepts from the serial ports the following  control
  360.        characters:
  361.        cntl-C  Aborts the current operation.
  362.        cntl-H  Backspace, deletes the last character typed.
  363.        cntl-I  Attempts to complete file and folder names.
  364.        cntl-M  Terminates a command and starts its execution.
  365.        cntl-Z  EOF,  used  in conjunction with MORE to  store  text
  366.                into a file.
  367.  
  368.        Testing a port
  369.        The  small utility program SendToPort provided on the MacDOS
  370.        floppy  (in the folder serial comms) sends characters  to  a
  371.        serial port and can be used to test a particular setup.
  372.  
  373.        You  can also use SendToPort to control a copy of MacDOS  on
  374.        a  different system: connect the two Macs via a serial  port
  375.        (eg.  the modem port), start SendToPort on the "master"  Mac
  376.        and  direct  it  to  use port A, then start  MacDOS  on  the
  377.        "slave"  Mac  and  type at the MacDOS prompt  the  following
  378.        command:  "serial  a@".  This will  direct  the  "slave"  to
  379.        accept  commands  via the modem port without  replying.  You
  380.        will  then be able to control the "slave" remotely by typing
  381.        on the "master" commands like:
  382.           dir^m
  383.           confirm on^m
  384.        You  will also be able to abort "slave" operations by typing
  385.        on the "master" the two characters ^C .
  386.  
  387.        For  additional information on SendToPort, please  refer  to
  388.        the README file in the same folder.
  389.  
  390.    Examples
  391.        SERIAL AA /M
  392.        sets  both  input and output to the modem port. MacDOS  then
  393.        sends  to  the port all characters displayed in the  console
  394.        window  and  displays on the console window  all  characters
  395.        received from the same port.
  396.  
  397.        SERIAL BA
  398.        sets  the  input to the printer port and the output  to  the
  399.        modem  port.  MacDOS  then  sends  to  the  modem  port  all
  400.        characters  displayed  in  the console  window  and  accepts
  401.        characters  from the printer port as if they had been  typed
  402.        on the keyboard.
  403.  
  404.        SERIAL BA
  405.        sets  the  input to the modem port and disables the  output.
  406.        MacDOS  then accepts characters from the modem  port  as  if
  407.        they  had  been typed on the keyboard but does not send  any
  408.        character to either serial port.
  409.  
  410.    Frequently occurring errors
  411.        MacOS Error -97
  412.        The  port  is  in  use.  Use the  other  port  if  you  can.
  413.        AppleTalk could be the culprit.
  414.  
  415.  
  416. SET
  417.        displays, sets, and removes global variables.
  418.  
  419.    Syntax
  420.        set [var=[value]]
  421.  
  422.    Parameters
  423.        var
  424.        is  the name of the variable to be SET. If you omit var, SET
  425.        displays the list of variables with their values.
  426.  
  427.        value
  428.        is  the string to be assigned to the variable. When you omit
  429.        value,  SET behaves in different ways depending on the  type
  430.        of  variable: system variables are re-initialised  to  their
  431.        defaults,   while   user-defined   variables   are   removed
  432.        altogether.
  433.  
  434.    MacDOS vs DOS
  435.        SETting of system variables
  436.        When  you set the system variables PROMPT, DIRCMD, and  PATH
  437.        to  an  empty  string,  MacDOS sets them  to  their  default
  438.        values, while DOS removes them.
  439.  
  440.        Spaces and variable names
  441.        MacDOS ignores the spaces between the variable name and  the
  442.        equal  sign,  while  DOS does not. The result  is  that  DOS
  443.        creates  variables with names which terminate  with  one  or
  444.        more  spaces. For example, DOS responds to the command  "set
  445.        var  =3"  by  setting a variable named "var  "  rather  than
  446.        simply "var"!
  447.  
  448.        MacDOS  also  replaces multiple spaces  and  tabs  within  a
  449.        variable  name with single spaces. As MacDOS uses the  equal
  450.        sign  to  delimit  the variable name, you  must  not  double
  451.        quote variable names.
  452.  
  453.    Notes
  454.        Spaces after the equal sign
  455.        The  variable  is  SET to whatever follows the  equal  sign,
  456.        including  any  space. Therefore, "set var  =  a  "  sets  a
  457.        variable named "var" to " a ".
  458.  
  459.        Variable names
  460.        The  names are not case sensitive and are actually saved  by
  461.        MacDOS  in upper case. If you use double quotes in  variable
  462.        names,  you  run into trouble when you try to  do  something
  463.        with  those  variables, because in all  other  commands  the
  464.        double  quotes  are  used  to  delimit  names  and  are  not
  465.        considered to be part of the names themselves. This  anomaly
  466.        of SET was introduced to be consistent with DOS.
  467.  
  468.    Examples
  469.        set a numeric var =      33
  470.        set ZZZ=strings do not need to be enclosed in double quotes
  471.        set prompt=
  472.  
  473.    See Also
  474.        INCR, DECR, TOUPPER, SSTR, PATH, PROMPT, DIR
  475.  
  476.  
  477. SHIFT
  478.        moves  the replaceable parameters of a batch program forward
  479.        one position.
  480.  
  481.    Syntax
  482.        shift
  483.  
  484.    MacDOS vs DOS
  485.        The two implementations are identical.
  486.  
  487.    Notes
  488.        SHIFT  allows you to execute batches with more than 9  user-
  489.        defined replaceable parameters (the current maximum is 24).
  490.  
  491.        After   MacDOS   has   executed  the  command   SHIFT,   the
  492.        replaceable parameter 0 contains what was previously  in  1,
  493.        1  contains  what  was  in  2, etc.   The  last  replaceable
  494.        parameter  (ie. 9) contains what you typed as 10th parameter
  495.        of the batch program and was previously unaccessible.
  496.  
  497.        By  using  SHIFT  repeatedly, you gain  access  to  all  the
  498.        strings you typed after the batch name when you started  the
  499.        program. This is particularly useful if you need to  perform
  500.        the same operation on all parameters. In that case:
  501.          1   Write the code for %1.
  502.          2     After  performing  the  operation  the  first  time,
  503.           execute   SHIFT   and  re-execute  the  code   from   the
  504.           beginning.  The new %1 will then contain what during  the
  505.           initial pass was in the second parameter.
  506.          3    Repeat  the  same sequence several  times  until  you
  507.           find that %1 is empty.
  508.  
  509.    Examples
  510.        This   batch   uses   SHIFT  to  process   all   replaceable
  511.        parameters, one at a time:
  512.           :LOOP_LBL
  513.               if "%1x" == x goto END_LBL
  514.               perform on %1 the required task
  515.               ...
  516.               shift
  517.               goto LOOP_LBL
  518.           :END_LBL
  519.  
  520.  
  521. SHOW
  522.        retrieves the message corresponding to an error code.
  523.  
  524.    Syntax
  525.        show err [var]
  526.  
  527.    Parameters
  528.        err
  529.        is the error code
  530.  
  531.        var
  532.        is  the  name  of  the variable where SHOW is  requested  to
  533.        store  the  message. If var is omitted,  SHOW  displays  the
  534.        message  on the screen. If MacDOS does not "know"  an  error
  535.        code, SHOW just displays the error code itself.
  536.  
  537.    MacDOS vs DOS
  538.        DOS does not support SHOW.
  539.  
  540.    Notes
  541.        Additional parameters
  542.        SHOW ignores additional parameters.
  543.  
  544.        SHOW, DOSERR, and ONERROR
  545.        SHOW  is  particularly useful to implement  your  own  error
  546.        handling in a batch program, especially when executing  with
  547.        ECHO  OFF. You can trap errors with ONERROR, jump to a fixed
  548.        command  line,  and then use the system variable  DOSERR  to
  549.        decide  what  action is necessary. Also,  you  can  use  the
  550.        command SHOW %DOSERR% to display error messages in clear:
  551.              ! setup error trapping
  552.              onerror ERR_LBL
  553.              ! setup return label
  554.              set RET =LBL_1
  555.              set DOSERR=0
  556.               !  ***  here  insert the command for which  you  want
  557.        ***
  558.                    !      ***      to      trap      the      error
  559.        ***
  560.           :LBL_1
  561.              ...
  562.              goto DONE_LBL
  563.  
  564.           :ERR_LBL      error-handling procedure
  565.              if %DOSERR% == ...
  566.              show %DOSERR%
  567.              ! reset error trapping and resume normal execution
  568.              onerror
  569.              goto %RET%
  570.  
  571.             :DONE_LBL       come  here  to  terminate   the   batch
  572.        program
  573.  
  574.    Examples
  575.        show 27
  576.        returns the string  File or directory not found
  577.  
  578.        show 333
  579.        returns the string  333
  580.  
  581.        show %var1% var2 the rest of the line is ignored
  582.        stores  into  var2  the error message corresponding  to  the
  583.        code stored in var1
  584.  
  585.        show abcd efgh ijkl
  586.        sets the variable  efgh  to the string  abcd
  587.  
  588.    See Also
  589.        ONERROR
  590.  
  591.  
  592. SHUTDOWN
  593.        shuts down the Macintosh.
  594.  
  595.    Syntax
  596.        shutdown
  597.  
  598.    MacDOS vs DOS
  599.        DOS does not support SHUTDOWN.
  600.  
  601.    See Also
  602.        RESTART
  603.  
  604.  
  605. SSTR
  606.        extracts SubSTRings from variables.
  607.  
  608.    Syntax
  609.        sstr var [delim] [/E] [/L | /R]
  610.  
  611.    Parameters
  612.        var
  613.        is  the name of the variable from which the substring is  to
  614.        be  extracted.  SSTR replaces the content of  var  with  the
  615.        substring.
  616.  
  617.        delim
  618.        is  the string which delimits the substring. MacDOS searches
  619.        var  and  stops  when  it  finds  delim.  Depending  on  the
  620.        presence   of  switches,  MacDOS  extracts  from   var   the
  621.        substring on the left or on the right of delim. If you  omit
  622.        delim  or  delim  is  empty, MacDOS  leaves  var  unchanged.
  623.        MacDOS  aborts  the command and reports an  error  when  var
  624.        does not contain delim.
  625.  
  626.    Switches
  627.        /E
  628.        searches var from the End (ie. from right to left). When  /E
  629.        is  omitted, the search is done from the beginning (ie. from
  630.        left to right).
  631.  
  632.        /L | /R
  633.        specifies  whether the substring is to be extracted  on  the
  634.        Left  or on the Right of delim. If you omit both /L and  /R,
  635.        /L  is  assumed. If you include in the command both  /L  and
  636.        /R, the command is rejected.
  637.  
  638.    MacDOS vs DOS
  639.        DOS does not support SSTR.
  640.  
  641.    Notes
  642.        Upper and lower case
  643.        Searches  are always case sensitive. If you need to  perform
  644.        a  case-insensitive search, convert first var and  delim  to
  645.        uppercase with TOUPPER.
  646.  
  647.    Examples
  648.        set var=a few chars and nothing more
  649.        sstr var "and nothing"     var now contains: "a few chars "
  650.        sstr var /E " "            var now contains: "a few chars"
  651.        sstr var w /R              var now contains: " chars"
  652.        sstr var a /L              var now contains: " ch"
  653.  
  654.    Frequently occurring errors
  655.        E72: String search failed
  656.        the string delim could not be found within var.
  657.  
  658.    See Also
  659.        SET, INCR, DECR, TOUPPER
  660.  
  661.  
  662. SUBSTVOL
  663.        creates a literal volume ID.
  664.  
  665.    Syntax
  666.        substvol letter vol
  667.  
  668.    Parameters
  669.        letter
  670.        is  a  character  between  'A' and 'Z'  (case  insensitive).
  671.        letter can then be used in place of vol in all commands.
  672.  
  673.        vol
  674.        is  a  volume  identifier (1 is the start-up  volume).  Note
  675.        that the volume does not need to be mounted.
  676.  
  677.    MacDOS vs DOS
  678.        DOS does not support SUBSTVOL.
  679.  
  680.    Notes
  681.        SUBSTVOL  was  introduced  to  make  the  porting  of  batch
  682.        programs  from  DOS easier by allowing you  to  use  letters
  683.        instead of numbers when identifying volumes.
  684.  
  685.    See Also
  686.        VOL
  687.  
  688.  
  689. TIME
  690.        displays  and  sets  the system time and  the  time  format.
  691.        MacDOS  uses the format set through TIME whenever  it  needs
  692.        to  display  a time (starting a LOG file, in a DIR  listing,
  693.        etc.).
  694.  
  695.    Syntax
  696.        time [time]
  697.  
  698.    Parameters
  699.        time
  700.        is  the time which should become the new system time.  Also,
  701.        the  format of the new time becomes the new format  used  by
  702.        MacDOS  whenever  it displays a time. If you  type  midnight
  703.        (ie.  00:00:00a  for  a 12h format and 24:00:00  for  a  24h
  704.        format), MacDOS only updates the time format and leaves  the
  705.        system  time  unchanged. If you omit time,  MacDOS  displays
  706.        the  current  system time in the current format and  prompts
  707.        you  for a new time. You can then type the new time, or  hit
  708.        Carriage Return if you do not want to change anything.
  709.  
  710.    MacDOS vs DOS
  711.        DOS  does  not  let  you  change the clock  format  via  the
  712.        command TIME.
  713.  
  714.    Notes
  715.        12h vs. 24h clocks
  716.        To  change between 12h and 24h clock formats, you only  need
  717.        to  type a time in the new format. The best way of doing  it
  718.        is  to  include in autoexec.bat the setting of midnight.  By
  719.        default,  time  is displayed in 24h format  with  colons  as
  720.        separators.
  721.  
  722.        Partial time specification
  723.        You  can  omit  to specify the seconds or both  minutes  and
  724.        seconds.  In  that case, MacDOS sets the missing  fields  to
  725.        zero.  Note that a time specification cannot terminate  with
  726.        a  separator. Therefore, times like 17:20 and 18 are  legal,
  727.        while  17:20:  and  18:  are  not.  Also,  you  cannot  omit
  728.        intermediate  fields.  Therefore,  times  like  16::45   and
  729.        :20:30 are illegal.
  730.  
  731.    Examples
  732.            command            old time      new time
  733.            time 00:00.00      16:03:20      16:03.20
  734.            time 00:00.00      04:03:20p     04:03.20p
  735.            time 00:00.00a     16:03:20      04:03.20p
  736.            time 00:00.00a     04:03:20p     04:03.20p
  737.            time 24;00;00      16:03:20      16;03;20
  738.            time 24;00;00      04:03:20p     16;03;20
  739.            time 17:20/03      16:03:20      17:20/03
  740.            time 17:20/03      04:03:20p     17:20/03
  741.            time 08-15-30      16:03:20      08-15-30
  742.            time 08-15-30a     16:03:20      08-15-30a
  743.            time 17            16:03:20      17:00:00
  744.            time 17:7          16:03:20      17:07:00
  745.            time 17:7          04:03:20p     17:07:00
  746.  
  747.    Frequently occurring errors
  748.        E52: Invalid time
  749.        Probably one of the fields was outside its valid range.
  750.  
  751.    See Also
  752.        DATE
  753.  
  754.  
  755. TOUPPER
  756.        converts variable contents to uppercase.
  757.  
  758.    Syntax
  759.        toupper var
  760.  
  761.    Parameters
  762.        var
  763.        is  the  name  of  the  variable to  be  converted.  TOUPPER
  764.        replaces  the  string contained in var  with  its  uppercase
  765.        version.
  766.  
  767.    MacDOS vs DOS
  768.        DOS does not support TOUPPER.
  769.  
  770.    Notes
  771.        Diacritical marks
  772.        TOUPPER   converts   strings  with  the  standard   function
  773.        provided  by  the  Macintosh Toolbox. Therefore,  characters
  774.        with  diacritical marks are converted to uppercase correctly
  775.        (ü to Ü, ö to Ö, etc.).
  776.  
  777.    See Also
  778.        DECR, INCR, SSTR
  779.  
  780.